package com.stagewebserver.webserver.controller;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.stagecommon.common.pojo.DemandFormat;
import com.stagecommon.common.pojo.RespBean;
import com.stagewebserver.webserver.service.DemandFormatService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @author: yxl
 * @since: 2022-04-24
 **/
@RestController
@RequestMapping("/demandFormat")
public class DemandFormatController {

    @Autowired
    private DemandFormatService demandFormatService;

    /**
     * 根据需求格式类型获取格式列表
     * @param demandFormat
     * @return
     */
    @PostMapping("/selectFormatByType")
    public RespBean<List<DemandFormat>> selectFormatByType(@RequestBody DemandFormat demandFormat){
        return demandFormatService.selectFormatByType(demandFormat.getType());
    }
}
